<?php
/**
 * 默认接口服务类
 *
 * @author: dogstar <chanzonghuang@gmail.com> 2014-10-04
 */

class Api_Test extends PhalApi_Api {

	public function getRules() {
        return array(
            'test' => array(

            ),
        );
	}
	
	/**
	 * 默认接口服务
	 * @return string title 标题
	 * @return string content 内容
	 * @return string version 版本，格式：X.X.X
	 * @return int time 当前时间戳
	 */
	public function test() {
		$rs = array('code' => 0, 'msg' => '', 'info' => array('a' => 1));

		$domain = new Domain_Manager();
		$gg[]='';


		$info = $domain->sendMQTT("12345","getTest");

		if (empty($info)) {
			DI()->logger->debug('', '');

			$rs['code'] = 1;
			$rs['msg'] = T('失败');
			return $rs;
		}

		$rs['info'] = $info;
		DI()->logger->debug('info of login', $rs);

		return $rs;

	}
}